<?php
namespace app\api\controller;

use think\Controller;
use think\Db;

class V1 extends Controller
{
	public function get_ques_list()
	{

		$allData = Db::name('question')
		->alias('t1')
		->field('t1.*,t2.nickname,t2.face,t3.cate_name')
		->join('user t2','t1.user_id = t2.user_id')
        ->join('cate t3','t1.cate_id = t3.cate_id')
        ->order('t1.create_time desc')
		->select();

		$temp = [];


		foreach ($allData as $k => $row) {
			$row['face'] = "http://1o533n8683.imwork.net/".$row['face'];
			$temp[]=$row;
		}
	
		echo json_encode($temp);exit;

	}
}